<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./axios.min.js"></script>
    <style>
        * {
            padding: 0;
            margin: 0;
            box-sizing: border-box;
        }

        .w {
            width: 1200px;
            margin: auto;
        }

        .top {
            margin: 20px 0;
        }

        a {
            text-decoration: none;
            color: #000;
            background-color: #eee;
            padding: 6px;
            margin: 8px;
        }

        .active {
            background-color: red;
            color: #fff;
        }
        .list{
            margin-top: 15px;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .list li {
            list-style: none;
            flex-basis: 200px;
            flex-grow: 1;
            height: fit-content;
            padding: 10px;
            box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
            cursor: pointer;
        }
        .list li img{
            width: 100%;
        }
        h5{
            margin: 10px 0;
        }
        
    </style>
</head>

<body>
    <div class="container w">
        <div class="top">
            <!-- <a href="#">赘婿</a>
            <a href="#">赘婿</a>
            <a href="#">赘婿</a> -->
        </div>
        <hr>
        <ul class="list">
            <!-- <li>
                <img src="https://static.zhonglian.com/upload/200004/2024/03/15/11/9aaaeaa4155c8a6e9999f99731155aec.png" alt="">
                <h5 class="title">大郎，起来喝药了</h5>
                <div class="description">“大郎”险招“金莲”毒手</div>
            </li> -->
        </ul>
    </div>
    <script>
        const baseUrl = 'https://playlet.zonelian.com';
        var top=document.querySelector('.top')


        axios({
            url: 'http://playlet.zonelian.com/api/category/list',
            method: "GET",
            params: {
                page: 1,
                limit: 10,
                zlsj : 'zlsj'
            }
        }).then(function (res) {
            if (res.status === 200) {
                console.log(res.data);
                var html=''
                res.data.forEach(item=>{
                    html+=`
                     <a href="#">${item.name}</a>
                    `
                })
                top.innerHTML=html
            }
        })
    </script>
</body>

</html>